/**
 *******************************************************************************
 * @file  is62wv51216.h
 * @brief This file contains all the functions prototypes of the SRAM component
 *        library for is62wv51216.
 @verbatim
   Change Logs:
   Date             Author          Notes
   2020-06-12       Hongjh          First version
 @endverbatim
 *******************************************************************************
 * Copyright (C) 2020, Huada Semiconductor Co., Ltd. All rights reserved.
 *
 * This software component is licensed by HDSC under BSD 3-Clause license
 * (the "License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at:
 *                    opensource.org/licenses/BSD-3-Clause
 *
 *******************************************************************************
 */
#ifndef __IS62WV51216_H__
#define __IS62WV51216_H__

/* C binding of definitions if building with C++ compiler */
#ifdef __cplusplus
extern "C"
{
#endif

/*******************************************************************************
 * Include files
 ******************************************************************************/
#include "hc32_common.h"
#include "ddl_config.h"

/**
 * @addtogroup BSP
 * @{
 */

/**
 * @addtogroup Components
 * @{
 */

/**
 * @addtogroup IS62WV51216
 * @{
 */

#if (BSP_IS62WV51216_ENABLE == DDL_ON)

/*******************************************************************************
 * Global type definitions ('typedef')
 ******************************************************************************/

/*******************************************************************************
 * Global pre-processor symbols/macros ('#define')
 ******************************************************************************/

/*******************************************************************************
 * Global variable definitions ('extern')
 ******************************************************************************/

/*******************************************************************************
  Global function prototypes (definition in C source)
 ******************************************************************************/
/**
 * @addtogroup IS62WV51216_Global_Functions IS62WV51216 Global Functions
 * @{
 */

en_result_t IS62WV51216_Init(void);
void IS62WV51216_GetMemInfo(uint32_t *pu32MemStartAddr,
                                    uint32_t *pu32MemByteSize);

en_result_t IS62WV51216_WriteMem8(uint32_t u32Address,
                                        const uint8_t au8SrcBuffer[],
                                        uint32_t u32BufferSize);
en_result_t IS62WV51216_ReadMem8(uint32_t u32Address,
                                        uint8_t au8DstBuffer[],
                                        uint32_t u32BufferSize);
en_result_t IS62WV51216_WriteMem16(uint32_t u32Address,
                                        const uint16_t au16SrcBuffer[],
                                        uint32_t u32BufferSize);
en_result_t IS62WV51216_ReadMem16(uint32_t u32Address,
                                        uint16_t au16DstBuffer[],
                                        uint32_t u32BufferSize);
en_result_t IS62WV51216_WriteMem32(uint32_t u32Address,
                                        const uint32_t au32SrcBuffer[],
                                        uint32_t u32BufferSize);
en_result_t IS62WV51216_ReadMem32(uint32_t u32Address,
                                        uint32_t au32DstBufferBuf[],
                                        uint32_t u32BufferSize);

/* Implement the below functions for the specified BSP board */
en_result_t BSP_SMC_IS62WV51216_Init(void);

void BSP_SMC_IS62WV51216_GetMemInfo(uint32_t *pu32MemStartAddr,
                                            uint32_t *pu32MemByteSize);

/**
 * @}
 */

#endif /* BSP_IS62WV51216_ENABLE */

/**
 * @}
 */

/**
 * @}
 */

/**
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /* __IS62WV51216_H__ */

/*******************************************************************************
 * EOF (not truncated)
 ******************************************************************************/
